package com.hue.utils;

import com.hue.entity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Component;

@Component
public class RedisUtils {
    @Autowired
    private RedisTemplate redisTemplate;

    public  User getUser(String token){
        User user = (User) redisTemplate.opsForValue().get("user:"+token);
        return user;
    }
}
